package com.yuanxiao.common.core.utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by luozongsheng on 20/12/2016.
 */
public class RandomUtils {

    public static String buildRandomStr(int randomLength){
        Random random = new Random();
        SimpleDateFormat sdf=new SimpleDateFormat("yyyyMMddhhmmssSSS");
        String str = sdf.format(new Date());
        for(int i=0;i<randomLength;i++){
            str += random.nextInt(10);
        }
        return str;
    }

}
